
$(function(){
	
	/***获取相关信息***/
	var menu = $(".menu"),
	    search_btn = $(".search_btn"),
	    p_top = $(".p_top"),
	    login_btn = $(".login_btn"),
	    section = $("section"),
	    footer = $("footer"),
	    permenu = $(".permenu"),
	    login = $(".login"),
	    search = $(".search"),
	    search_close = $("#search_close"),
	    leftcontent = $(".leftcontent");
	    
	/***点击search_btn相应的事件***/
	search_btn.click(function(){
		search.animate({"top":"0"},300);
		section.fadeOut(300);
		footer.fadeOut(300);
	});
	/***热搜页面点击关闭按钮***/
	search_close.click(function(){
		search.animate({"top":"-100%"},300);
		section.fadeIn(300);
		footer.fadeIn(300);
	});
	
	/***首页头部菜单按钮***/
	menu.click(function(){
		leftcontent.animate({"left":"0"},300);
		section.fadeOut(300);
		footer.fadeOut(300);
	});
	/***点击关闭按钮***/
	p_top.click(function(){
		leftcontent.animate({"left":"-100%"},300);
		section.fadeIn(300);
		footer.fadeIn(300);
	});
	
	/***点击“立即登录”按钮***/
	login_btn.click(function(){
		permenu.css("display","none")
		login.css("display","block");
	})
	
});